Skip to content

Conversation

@KushalMeghani1644
Copy link
Contributor

This PR implements the dscratch0 and dscratch 1 CSRs

Related to #1

@KushalMeghani1644 KushalMeghani1644 requested a review from a team as a code owner November 13, 2025 13:01
@romancardenas
Copy link
Contributor

Maybe this is a good opportunity for a macro like read_write_csr_as_usize something like this but with writing. Don't you think?

Also, rebase this branch with master. It should pass all the CI checks.

@KushalMeghani1644
Copy link
Contributor Author

Thanks! and that's a good idea! I will soon push the changes with this macro added and being used for the dscratch0 and 1 codes! I'll also rebase with master so the CI is happy again :)

@KushalMeghani1644
Copy link
Contributor Author

Oops! Seems like I broke something... I'll fix this ASAP

@KushalMeghani1644
Copy link
Contributor Author

KushalMeghani1644 commented Nov 14, 2025

Hola! @romancardenas, I’ve rebased my branch onto upstream/master and Git reports that everything is already up-to-date:

git rebase upstream/master
Current branch dscratch0_and_dscratch1 is up to date.

The CI’s main tests pass, but those two lints still fail. I’ll take a look and fix the clippy issues next but I Just wanted to confirm that the rebase itself was done correctly.

Edit: Why can't we just use clippy stable? or pin the version if clippy nightly is strictly needed?

fn test_dscratch0_read_write() {
for i in 0..usize::BITS {
let val = 1usize << i;
let _ = unsafe { try_write(val) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the test check that the result is an Unimplemented error at least

fn test_dscratch1_read_write() {
for i in 0..usize::BITS {
let val = 1usize << i;
let _ = unsafe { try_write(val) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, check that the error is of the kind Unimplemented

@romancardenas
Copy link
Contributor

Why can't we just use clippy stable? or pin the version if clippy nightly is strictly needed?

Clippy is a tool that helps us developing high quality code and avoid unwanted patterns. While I agree with you it is annoying when a brand new lint fails, I think it is valuable to have continuous improvement of the tool, as it serves for improving our project.

@romancardenas
Copy link
Contributor

BTW please do not fix the clippy lint that fails. It will be fixed in another PR. Once merged, you can rebase from master and get the patch for you.

@KushalMeghani1644
Copy link
Contributor Author

Thanks for the review! @romancardenas I have updated the tests as instructed!

@romancardenas
Copy link
Contributor

@KushalMeghani1644 rebase from master, now CI should pass

@KushalMeghani1644
Copy link
Contributor Author

KushalMeghani1644 commented Nov 17, 2025

DONE! @romancardenas I have rebased from master and all the CI checks pass! Is there any other change to be made?

@romancardenas romancardenas added this pull request to the merge queue Nov 17, 2025
Merged via the queue into rust-embedded:master with commit 86531a7 Nov 17, 2025
139 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants